<% if @saved == true %>
    <% flash[:notice] = "successfully created." %>
    $('#admin_title').html("<%= j 'Manage Hotels' %>");
    $('#filter_admin').show();
    $('#admin_content').html("<%= j render partial: 'hotels/index', locals: { :hotels => @hotels } %>")
    $('#filter_admin').html("<%= j render partial: 'hotels/filter_hotels', locals: { :hotels => @hotels } %>");
    $("#flash_message_wrapper").html("<%=j render partial: 'layouts/flash_messages' %>");
    animateFlashMessages();
<% else %>
    <% flash[:alert] = "Something Error." %>
    $("#flash_message_wrapper").html("<%=j render partial: 'layouts/flash_messages' %>");
    animateFlashMessages();
<% end %>